package com.example.aigc_education.service;

import com.example.aigc_education.domain.Paper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.aigc_education.domain.dto.GenPaperRuleDTO;
import com.example.aigc_education.domain.request.AddFlashCardsRequest;
import com.example.aigc_education.domain.request.AddQuizzesRequest;
import com.example.aigc_education.domain.request.SaveFlashCardListRequest;
import com.example.aigc_education.domain.request.SaveOrSubmitQuizRequest;
import com.example.aigc_education.domain.vo.*;

import java.util.List;

/**
* @author 23918
* @description 针对表【stu_paper】的数据库操作Service
* @createDate 2024-06-20 10:48:39
*/
public interface PaperService extends IService<Paper> {

    /**
     * 自动组卷
     * @param paperId 试卷ID
     * @param genPaperRuleDTO 组卷规则
     * @return 问题集合
     */
    List<QuestionVO> generatePaper(Long paperId, GenPaperRuleDTO genPaperRuleDTO);

    /**
     * 更新试卷
     * @param questionId 问题ID
     * @param paperId 试卷ID
     * @return 是否更新成功
     */
    QuestionVO updatePaper(Long questionId, Long paperId);

    void addPaper(Paper paper);

    void updatePaper(Paper paper, Long paperId);

    void deletePaper(Long paperId);

    List<Paper> selectPaper();

    List<BriefFlashCardListVO> showAllFlashCardList(Long themeId);

    EntireFlashCardListVO getEntireFlashCardList(Long flashCardListId);

    boolean saveFlashCardList(SaveFlashCardListRequest saveFlashCardListRequest);

    boolean submitFlashCardList(SaveFlashCardListRequest saveFlashCardListRequest);

    boolean deleteFlashCardList(Long flashCardListId);

    boolean submitQuiz(SaveOrSubmitQuizRequest saveOrSubmitQuizRequest);

    boolean deleteQuiz(Long quizId);

    List<BriefQuizVO> showAllQuiz(Long themeId);

    EntireQuizVO getEntireQuiz(Long quizId);

    boolean saveQuiz(SaveOrSubmitQuizRequest saveOrSubmitQuizRequest);

    boolean redoQuiz(Long quizId);

    Long batchSaveQuiz(AddQuizzesRequest request);

    boolean batchSaveFlashCards(AddFlashCardsRequest request);
}
